<template>
<div class="column window-height items-center">
    <div style="margin-top:100px" class="q-pr-lg">
        <q-img src="icons/success.png" width="200px" contain></q-img>
    </div>
    <div class=" text-h5">{{msg}}</div>
    <div class="column items-center" style="position:absolute;bottom:100px;margin:0 auto;">
        <div class="q-mt-md"><a style="text-decoration: none;border: 1px solid rgb(19,114,74); padding:10px;border-radius:20px" class="text-teal-6" href="http://weixin.qq.com/q/02I6VkNVHB9nT10000g07c">点击关注【一方映画】公众号</a></div>
    </div>

</div>
</template>

<script>
import {
  uniQwQrcodeLoginCode
} from "assets/api/studio";
export default {
    name: "codepage",
    data() {
        return {
            code: "",
            msg: "扫码成功！",
            state: "",
            status: "",
        };
    },
    created() {
        this.code = this.$route.query.code;
        this.state = this.$route.query.state;

        this.verifycode();
    },
    methods: {
        verifycode() {
            if (this.code) {

                  let reqdata = {
                        code: this.code,
                        state: this.state,
                    };
                    uniQwQrcodeLoginCode(reqdata)
                        .then((res) => {
                            if (res.data.code == 1) {
                                this.status = 1;
                                this.msg = "操作成功！"
                            } else {
                                this.status = 0;
                            }
                        })
                        .catch((err) => {
                            this.status = 0;
                        });


            }
        },
    },
};
</script>

<style scoped>

</style>
